<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class ActivityUploads extends Model
{
    use HasFactory;
    protected $table="tbl_uploadlist";
    public static function newUpload($uid,$storename,$storedata){
        $upload=new ActivityUploads();
        $upload->unqid=$upload->table.'-'.uniqid().mt_rand(10000,99999);
        $upload->uid=$uid;
        $upload->storename=$storename;
        $upload->storedata=json_encode($storedata);
        $upload->save();
        return $upload;
    }
}
